public class Liste { public Object data; public Liste next; public Liste( Object d ) { data = d; next = null; } public void append(Liste l) { Liste t = this; while (t.next != null) { t = t.next; } t.next = l; } public Liste get(int position) { Liste t = this; while ( position > 0 && t != null) { t = t.next; position--; } return t; } public String toString() { Liste t = this; String r = ""; while (t != null) { r += t.data.toString(); t = t.next; } return r; } }